package com.escafoide.smm;

import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.ImageView;

public class explodeout extends Animation {
	private int initialHeight;
	private int targetHeight;
	private int initialWidth;
	private int targetWidth;
	ImageView view;

	public explodeout(ImageView v, int initialHeight, int targetHeight, int initialWidth, int targetWidth) {
		view = v;
		this.initialHeight = initialHeight;
		this.initialWidth = initialWidth;
		this.targetHeight = targetHeight;
	}

	protected void applyTransformation(float interpolatedTime, Transformation t) {
		view.getLayoutParams().height = (int) (initialHeight + targetHeight
				* interpolatedTime);
		view.getLayoutParams().width = (int) (initialWidth + targetWidth
				* interpolatedTime);
		view.requestLayout();
	}

	public void initalize(int width, int height, int parentWidth,
			int parentHeight) {
		super.initialize(width, height, parentWidth, parentHeight);

	}

	public boolean willChangeBounds() {
		return true;
	}
}
